const mongoose = require('mongoose')

let Schema = mongoose.Schema

let Users = new Schema({
    userName: {
        type: String,
        unique: true,
        required: true,
    },
    displayName: {
        type: String,
        default: this.userName
    },
    secretWord: {
        type: String,
        required: true
    },
    createAt: {
        type: Date,
        default: Date.now(),
    }
})

let User = mongoose.model('User', Users)

module.exports = User